var wsUrl = "ws://live.dickycai.top:8811";
var websocket = new WebSocket(wsUrl);
websocket.onopen = function (evt) {
    console.log('open');
};
websocket.onmessage = function (evt) {
    console.log(evt);
    push(evt.data)
};
websocket.onclose = function (evt) {
    console.log(evt);
}
function push(data) {
    data=JSON.parse(data);
    html='<div class="frame">' +
        '<h3 class="frame-header">' +
        '<i class="icon iconfont icon-shijian"></i>第一节 01：30' +
        '</h3>' +
        '<div class="frame-item">' +
        '<span class="frame-dot"></span>' +
        '<div class="frame-item-author">' +
        '<img src="./imgs/team1.png" width="20px" height="20px" /> 马刺' +
        '</div>' +
        '<p>'+data.content+'</p>' +
        '</div>' +
        '</div>';
    $('#match-result').prepend(html);
}
